package com.lg.system;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class CDataSource extends CLGAction {

	private Connection conn;  
	 private String url = "jdbc:oracle:thin:@10.0.2.184:1521:LGJOB";
	 private String classforname = "oracle.jdbc.driver.OracleDriver";
	 private String uid = "lg";
	 private String pwd = "lgjob";
	 public  Connection getConn()
	 {
	  try
	  {
	   Class.forName(classforname);
	   if (conn == null || conn.isClosed())
	    conn = DriverManager.getConnection( url, uid, pwd);
	  }
	  catch (ClassNotFoundException ex)
	  {
	   ex.printStackTrace();
	  }
	  catch (SQLException ex)
	  {
	   ex.printStackTrace();
	  }
	  return conn;  
	 }
}
